﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Order_Management
{
    public class Goods
    {
        public Goods(string name, int num, int price)
        {
            this.goodsName = name;
            this.goodsNum = num;
            this.goodsPrice = price;
        }

        public Goods()
        {

        }

        private string goodsName;
        private int goodsNum = 0;
        private int goodsPrice = 0;

        public string name
        {
            get
            {
                return this.goodsName;
            }
            set
            {
                this.goodsName = value;
            }
        }

        public int number
        {
            get
            {
                return this.goodsNum;
            }
            set
            {
                this.goodsNum = value;
            }
        }

        public int price
        {
            get
            {
                return this.goodsPrice;
            }
            set
            {
                this.goodsPrice = value;
            }
        }

        public override string ToString()
        {
            string goods = "商品名：" + this.goodsName + " "
                         + "商品价格：" + this.goodsPrice + " "
                         + "商品数目：" + this.goodsNum + " ";
            return goods;
        }
    }
}
